If-else statement comments [closed]
Posted
by
Jin35
on Programmers
See other posts from Programmers
or by Jin35
Published on 2012-04-11T08:21:45Z
Indexed on
2012/04/11
11:41 UTC
Read the original article
Hit count: 280
Possible Duplicate:
What is a good way to comment if-else-clauses?
What is the best way to write comments for if-else
statement? There is possible ways:
A.
//first comment
if (condition) {
...
}
//second comment
else {
...
}
B.
if (condition) { //first comment
...
}
else { //second comment
...
}
C.
if (condition) {
//first comment
...
}
else {
//second comment
...
}
Which one is the best, or there is some better possibilities?
© Programmers or respective owner